package OOday03;

import com.sun.corba.se.impl.orbutil.ObjectUtility;

public class RefArrayDemo {
    public static void main(String[] args) {
        Dog[] dogs = new Dog[3];
        dogs [0] = new Dog("够",1,"蓝");
        dogs [1] = new Dog("够",1,"蓝");
        dogs [2] = new Dog("够",1,"蓝");
        Fish[] fishes = new Fish[3];
        fishes [1] = new Fish("鱼摆摆",1,"紫")  ;
        fishes [0] = new Fish("鱼摆摆",1,"紫")  ;


        Chicken[] chickens = new Chicken[2];

        chickens[1] = new Chicken("小狗",2,"猫");chickens[0] = new Chicken("小狗",2,"猫");
        chickens[0] = new Chicken("小狗",2,"猫");
        for ( Animal x :dogs){
            x.drink();

        }

    }







}
